Integrand size = 23, antiderivative size = 69 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-(a-b)^2 x+\frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(2 a-b) b \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 472, 209} \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b (2 a-b) \tan ^3(e+f x)}{3 f}+\frac {(a-b)^2 \tan (e+f x)}{f}-x (a-b)^2+\frac {b^2 \tan ^5(e+f x)}{5 f} \]
[In]
[Out]
Rule 209
Rule 472
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^2 \left (a+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left ((a-b)^2+(2 a-b) b x^2+b^2 x^4+\frac {-a^2+2 a b-b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(2 a-b) b \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f}-\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -(a-b)^2 x+\frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(2 a-b) b \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.99 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {a^2 \arctan (\tan (e+f x))}{f}+\frac {2 a b \arctan (\tan (e+f x))}{f}-\frac {b^2 \arctan (\tan (e+f x))}{f}+\frac {a^2 \tan (e+f x)}{f}-\frac {2 a b \tan (e+f x)}{f}+\frac {b^2 \tan (e+f x)}{f}+\frac {2 a b \tan ^3(e+f x)}{3 f}-\frac {b^2 \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^5(e+f x)}{5 f} \]
[In]
[Out]
Time = 0.06 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.12
method | result | size |
norman | \(\left (-a^{2}+2 a b -b^{2}\right ) x +\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )}{f}+\frac {b^{2} \tan \left (f x +e \right )^{5}}{5 f}+\frac {\left (2 a -b \right ) b \tan \left (f x +e \right )^{3}}{3 f}\) | \(77\) |
derivativedivides | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}+\frac {2 a b \tan \left (f x +e \right )^{3}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}+a^{2} \tan \left (f x +e \right )-2 a b \tan \left (f x +e \right )+b^{2} \tan \left (f x +e \right )+\left (-a^{2}+2 a b -b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(97\) |
default | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}+\frac {2 a b \tan \left (f x +e \right )^{3}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}+a^{2} \tan \left (f x +e \right )-2 a b \tan \left (f x +e \right )+b^{2} \tan \left (f x +e \right )+\left (-a^{2}+2 a b -b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(97\) |
parallelrisch | \(-\frac {-3 b^{2} \tan \left (f x +e \right )^{5}-10 a b \tan \left (f x +e \right )^{3}+5 b^{2} \tan \left (f x +e \right )^{3}+15 a^{2} f x -30 a b f x +15 b^{2} f x -15 a^{2} \tan \left (f x +e \right )+30 a b \tan \left (f x +e \right )-15 b^{2} \tan \left (f x +e \right )}{15 f}\) | \(97\) |
parts | \(\frac {a^{2} \left (\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {2 a b \left (\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(101\) |
risch | \(-x \,a^{2}+2 x a b -x \,b^{2}+\frac {2 i \left (15 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}-60 a b \,{\mathrm e}^{8 i \left (f x +e \right )}+45 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+60 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-180 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+90 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+90 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-220 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+140 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+60 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-140 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+70 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+15 a^{2}-40 a b +23 b^{2}\right )}{15 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{5}}\) | \(217\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.06 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {3 \, b^{2} \tan \left (f x + e\right )^{5} + 5 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{3} - 15 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f x + 15 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{15 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (54) = 108\).
Time = 0.15 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.70 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\begin {cases} - a^{2} x + \frac {a^{2} \tan {\left (e + f x \right )}}{f} + 2 a b x + \frac {2 a b \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a b \tan {\left (e + f x \right )}}{f} - b^{2} x + \frac {b^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {b^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {b^{2} \tan {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{2}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.10 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {3 \, b^{2} \tan \left (f x + e\right )^{5} + 5 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{3} - 15 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (f x + e\right )} + 15 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{15 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 879 vs. \(2 (65) = 130\).
Time = 1.13 (sec) , antiderivative size = 879, normalized size of antiderivative = 12.74 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 11.89 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.45 \[ \int \tan ^2(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {2\,a\,b}{3}-\frac {b^2}{3}\right )}{f}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a-b\right )}^2}{a^2-2\,a\,b+b^2}\right )\,{\left (a-b\right )}^2}{f}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a^2-2\,a\,b+b^2\right )}{f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^5}{5\,f} \]
[In]
[Out]